package studentPC;
import java.util.ArrayList;  
import java.util.Scanner;  
public class Main {  
    public static void main(String[] args) {  
        Scanner scanner = new Scanner(System.in);  
        ArrayList<Student> students = new ArrayList<>();  

        while (true) {  
            System.out.println("请输入学生姓名（或输入'exit'退出）：");
            String name = scanner.nextLine();  
            if (name.equalsIgnoreCase("exit")) {  
                break;  
            }  
  
            System.out.println("请输入CPU型号：");
            String cpu = scanner.nextLine();  
  
            System.out.println("请输入GPU型号：");
            String gpu = scanner.nextLine();  
  
            System.out.println("请输入内存大小（例如：16GB）：");
            String memory = scanner.nextLine();  

            students.add(new Student(name, cpu, gpu, memory));  
        }  

        System.out.println("所有学生的电脑配置信息：");
        for (Student student : students) {  
            System.out.println(student);  
        }  

        scanner.close();  
    }

    private static class Student {
        public Student(String name, String cpu, String gpu, String memory) {
        }
    }
}
